package chpt04.abstractshapes;

public class Rectangle extends AbstractShape{
	private double length;
	private double width;
	public double getLength() {
		return length;
	}
	public void setLength(double length) {
		this.length = length;
	}
	public double getWidth() {
		return width;
	}
	public void setWidth(double width) {
		this.width = width;
	}
	
	public Rectangle() {
	}
	
	public Rectangle(double length, double width) {
		this.length = length;
		this.width = width;
	}
	
	public Rectangle(int x, int y, int id) {
		super(x, y, id);
	}
	
	public Rectangle(int x, int y, int id, double length, double width) {
		super(x, y, id);
		this.length = length;
		this.width = width;
	}
	
	public double getArea() {
		return length*width;
	}
	
	public double getPerimeter() {
		return 2*(length+width);
	}
	
	
	

}
